home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Tampa Bay Amiga Group
/
TBAG - Tampa Bay Amiga Group's Disk of the Month #70 (199x)(Merlin's Software - Amiganuts United)(PD).zip
/
TBAG - Tampa Bay Amiga Group's Disk of the Month #70 (199x)(Merlin's Software - Amiganuts United)(PD).adf
/
Docs
/
PopUpMenu.docs
< prev
next >
Wrap
Text File
|
1992-07-14
|
18KB
|
521 lines
PopUpMenu V4.3 by Martin Adrian 28/1 -92
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Introduction
~~~~~~~~~~~~
Are you using QMouse, DMouse, or HeliosMouse and "always" get the wrong
menues when you press the mousebutton?
Have you ever needed pop-up menues for your Amiga?
The solution: PopUpMenu
What is it ?
~~~~~~~~~~~~
This small program makes it possible for You to use popupmenues with
every program using standard intuition menues.
~~~~~
The popup-menues works just like the standard pull-down menues for both
the user (multiple selections, checkmarks, commandkeys) and the
programmer (MENUPICK and MENUVERIFY).
All intuition menu-flags (COMMSEQ, HIGHBOX, MENUTOGGLE ...)
are fully supported.
Features:
~~~~~~~~~
* The menues will not pop-up if any of the following conditions are true.
1) No window is active. \
2) The active window has no menues. |
3) The active window has the flag RMBTRAP set. |- Same as Intuition
4) The active window has a requester open. /
5) The mousepointer is in the screens menubar.
(standard pull-down menues will appear)
6) You are pressing any other mousebutton (left or middle).
7) A stringgadget is active. (Only intuition knows how to deselect them).
You will have to use pull-down menues.
* You may select if the menues should pop-up when you are holding a
qualifier key on Your keyboard down or not.
* Click-menues: You make Your selection with the select-button instead of
holding down the menubutton (works like I*M PC menues).
Excellent for programs with many menues (e.g. RSDemo).
* PopUpMenu can show a small arrow if a menuitem has subitems.
* MenuItems can be centered around the menu (To minimize mouse movements).
* The program remembers the last menu selected.
(Works only with items selected with PopUpMenues and does not remember
different windows).
* PopUpMenu has an intuition interface for setting options.
Starting PopUpMenu
~~~~~~~~~~~~~~~~~~
To use the program put the file `PopUpMenu' and 'PopUpMenu.info'
in your current directory.
---------------------- From CLI: ------------------------
To turn on the pop-up menues just type:
1> Run PopUpMenu [options]
Default options are -O -N -P -K19
I don't know how much stack exec and intuition needs.
PopUpMenu is using less than 800 bytes.
Setting stack to 3000 should be OK.
>>>>>> Warning! PopUpMenu is not self-detaching any more. <<<<<<
Arp users can type:
1> ARun PopUpMenu [Options] NOIO STACK 2500
(I suppose RunBack can do the same thing)
If PopUpMenu is already installed you can change or look at the
current options by starting PopUpMenu again.
1> PopUpMenu [options]
PopUpMenu Current options = -N -P -K19
(Use "-O" option to open the options window)
To turn off PopUpMenu use option "-X" from the CLI or use the
"Remove PopUpMenu" gadget in the option window.
1> PopUpMenu -X
---------------------- From WB: -----------------------
Click the PopUpMenu icon.
(WB 2.0 users may move the icon to the WBStartup drawer.
Don't forget the "DONOTWAIT" flag in the TOOLTYPES field)
To set the options
1. Put the string 'ARG=' in the TOOLTYPES field,
followed by the CLI options.
Example: ARG=-C -N -O- -K19
(If you enter an illegal option the option window will show up with
the default options set when You start PopUpMenu)
2. Put the long names in the TOOLTYPES field.
(I think WB2.0 users can skip the '=')
Example: CLICKMENUES=
POPNOQUAL=
NOOPTIONWINDOW=
HOTKEY=19
(Unkonown or misspelled options will be ignored)
When PopUpMenu is running, is the icon locked. This means that You can't
change any options from workbench.
To change the options use any of the following ways.
1) Start the program from workbench again. (The option window will show up)
2) Use the hotkey to open the option window.
You may use all options from the workbench but the "-X" and "-H" options
are not very useful. ("-X -O-" will do nothing at all)
Options
~~~~~~~
- - - - - - - - - Click-menues - - - - - - - - -
CLI: enable -C WB: enable CLICKMENUES
CLI: disable -C- WB: disable STDMENUES [default]
If a program has a lot of menues it may be difficult
to select the one You want. Click-menues lets You
slow and easy select it.
1. Press and release the menubutton.
2. The menues will show up.
3. Select the menu You want with the selectbutton.
4. Select the menuitem or subitem in the same way.
5. You may cancel the menu selection by pressing
the menubutton again.
- - - - - - - - Sub-item pointer - - - - - - - -
CLI: enable -P WB: enable SUBPOINTER [default]
CLI: disable -P- WB: disable NOSUBPOINTER
PopUpMenu will show a small arrow if a menuitem
has any sub-items.
- - - - - - - - Show single menu - - - - - - - -
CLI: enable -S WB: enable SHOWSINGLE
CLI: disable -S- WB: disable DONTSHOWSINGLE [default]
If a window has only one menu, PopUpMenu shows it
together with the menuitems. To disable this feature
turn this option on.
Show single Don't
+-----+ +------+
+-----|Items| |Menu |
|Menu | | |Items |
+-----| | | |
| | | |
+-----+ | |
+------+
- - - - - - - - Centered menuitems - - - - - -
CLI: enable -I WB: enable ITEMSCENTERED
CLI: disable -I- WB: disable ITEMSTOP [default]
When PopUpMenu displays the menu-items it usually
places the top item next to the menu. With this
option on, the items are centered around the menu.
Top Centered
+------+ +------+
| | | +-----+
| | | |Items|
| +-----+ | | |
|Menu |Items| |Menu | |
+-----| | +-----| |
| | | |
| | +-----+
| |
+-----+
- - - Pop-up when no qualifier is pressed - - -
CLI: enable -N WB: enable POPNOQUAL [default]
CLI: disable -N- WB: disable DONTPOPNOQUAL
- - - Pop-up when a qualifier is pressed - - -
CLI: enable -Q WB: enable POPWITHQUAL
CLI: disable -Q- WB: disable DONTPOPWITHQUAL [default]
These options controls when the menues should pop-up.
(Qualifier = SHIFT, ALT, AMIGA, CTRL)
You may set both (menues will always pop-up) or none (menues
will never pop-up).
- - - - - - - Open option window - - - - - - -
CLI: enable -O WB: enable OPTIONWINDOW [default]
CLI: disable -O- WB: disable NOOPTIONWINDOW
Open the PopUpMenu option window.
- - - - - - - - - - Set Hotkey - - - - - - - - - -
CLI: enable -K## WB: enable HOTKEY=## [default = 19 => 'P']
Use this option to set the hot-Key. If the hot-key is pressed
together with CTRL and ALT the PopUpMenu option window will
show up on the Workbench screen.
## means the hex code for the key. (default = 'P')
- - - - - - - - Remove PopUpMenu - - - - - - - -
CLI: enable -X
This option will remove PopUpMenu from memory.
- - - - - - - - - - Show help - - - - - - - - - -
CLI: enable -H
Display a help message. (The help message will also appear if
PopUpMenu can't understand Your options)
PopUpMenu option window
~~~~~~~~~~~~~~~~~~~~~~~
When You select the -O option, press the hot-key or starts the program
from workbench a second time, the PopUpMenu option window will show up on
Your workbench screen.
In this window You may enable or disable any option with a mouse-click
or by pressing the corresponding key.
The hot-key can be changed by pressing CTRL + ALT + the desired key.
There are four more gadgets in the window:
Name Key Action
~~~~ ~~~ ~~~~~~
Use Return - Closes the window and uses the currently selected
options.
Reset R - Resets any changes made.
Cancel Esc - Closes the window but doesn't change any options.
(Same as Reset + Use)
Remove PopUpMenu X - Closes window and removes PopUpMenu from memory.
(No "Are You sure" requester will show up)
Differences from Intuition:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bad:
Drag-select is not supported (i never use it), Use Multiple selcet.
Menu flag MENUTOGGLED is not supported.
Intuition draws the menues off-screen and then swaps them to the screen.
PopUpMenu draws the menues on the screen. (I don't want to create a
rastport just to draw them)
Good:
The mousepointer does not stop while menuwindows are opened or closed.
(Makes it easier to select items when your amiga has much to do)
Good or bad ?
PopUpMenu does not remove any inputevents (RAWKEY, MOUSEMOVE ...)
while the menues are shown. (Intuition needs these to move the
mousepointer etc.)
If a menu does not have menuitems, intuition shows a small empty
itemwindow. PopUpMenu does not show anything at all.
Same as Intuition:
~~~~~~~~~~~~~~~~~~
* PopUpMenu handles multiple selection as silly as intuition.
Don't select a menuitem more than once or the checkmarks may be moved
to the wrong item.
Program size
~~~~~~~~~~~~
The program size is much bigger than before but don't worry the memory
usage is almost the same (~10K). The code for option parsing and the
option window are overlayd. The code and data for them will only be
loaded only when needed.
Distribution
~~~~~~~~~~~~
This version of the PopUpMenu program is released as Public Domain.
~~~~~~~~~~~~~~
This program may be used, copied, included in a library or commercial
product as long as You don't do it for profit.
(Please include PopUpMenu.doc in the copy)
You may also use the source in your own programs (if You can read it),
If You intend to do a similar popupmenu-program with it please let me
know so we can cooperate instead of compete.
Warnings:
~~~~~~~~~
1. If a string gadget is active when You press the menu button,
You will recieve pull-down menues. (Only intition or You can deselect
a string gadget)
A strange effect shows up if You double click the menu button in the
req.library file requester. The first click will deselect the string
gadget and activate the pull-down menues. The second click will give You
popup-menues. But after a short time (1 second or so) the string gadget
will be activated again and Your menu selection will be neglected until
You deselects the gadget.
2. QMouse has an inputhandler that sends messages (i think) to its task
when the mouse is moved over window borders. When the screen is locked
QMouse can't activate the window under the mouse but the messages will
continue to come. When the menu selection is done Qmouse will handle all
the messages and activate the windows one by one (The window titles will
flash). The problem is most annying when using Click-menues.
I think the problem is the same with Dmouse, HeliosMouse,
SumMouse etc.
A first look at the new commodities shows that they are even worse.
They activate the windows from within their inputhandler. (see 6.)
3. Some people have reported that PopUpMenu 3.X does not work with PageSetter
(both version 1 and 2). I have tested PS1.2 (a french version) but it
crashes always on my Amiga (with or without PopUpMenu). I think PS
corrupts the FreeMemList when I enter the texteditor.
4. Yves Benoit in France, who is the lucky (?!) owner of a A3000, told me
he had some problems when putting PopUpMenu in the startup-sequence.
I don't know anything about KS 2.0 so i don't know what the problem is.
5. Don't use PopUpMenu with version number 2.XX since they may end up with
a spectacular crash and a visit to the guru.
6. Intuition is a very big inputhandler (i think), this means that intuition
will lockup the input.device if it (intuition) tries to draw something
(i.e activate a window) on a locked screen. This will lead to a deadlock
since my program is waiting for mouse-events from the input.device.
To walk around this I have installed a timer to go off every 0.2s, if
no inputevents has arrived in this time my program does the following:
1. Remove all displayed menues.
2. Unlock the screen.
3. Wait for the input.device to start.
4. Lock the screen again.
5. Draw all menues again.
This will make the menues flash once.
(Let's hope intuition works better in kickstart 2.0)
7. It is not possible to remove older versions (before 4.0) with
this program.
8. Some programs draw directly into the screen without using the
layers.library. Using PopUpMenu on these screens may produce strange
results. Only the data on the screen is affected.
Programs found: RSDemo, Imploder (4.0)
FUTURE:
~~~~~~~
User configurable qualifiers for the hot-key (CTRL+LALT is hard-coded now).
Multiple select with Click-menues. (Don't know how yet)
AREXX port (?!)
The program only remembers the last menu (not menuitem or subitem) selected.
Many people want's the item and subitems to all show up on the same side.
In the standard case this shouldn't be any problem but I have to think
about every case.
- What if it's impossible to open a big menu on any side ?
- Sub-items are positioned by the application program not PopUpMenu.
(Maybe I do it one day)
Author:
~~~~~~~
Martin Adrian
Rullharvsgatan 3A (New addres from 1-jun-91) ..
S-431 47 Mölndal (the ö is an 'o' with to dots above -> o )
SWEDEN
USENET: d5adria@dtek.chalmers.se ( Until June 1992 )
Thanks to:
Derek Zahn for the PopUpMenu program on FishDisk 96
Commodore for the Amiga
Arp - people for Arp 1.3 & AShell
Lattice for the C compiler (5.0)
My English teatcher
Anna my girlfriend
You for using this program.
New in version 4.3
~~~~~~~~~~~~~~~~~~
For use:
* Better workbench support.
* Possible to change the hotkey in the option window.
* Option window can be controlled from keyboard.
(All gadgets have keyboard eqvivalents)
Bugs Fixed:
* Removed a bug that sometimes cleared 1 bit at position $0014.
New in version 4.2
~~~~~~~~~~~~~~~~~~
For safety:
* Checks that no one has changed SetMenuStrip, ClearMenuStrip, OnMenu, OffMenu
before they are restored. (If someone has, PopUpMenu waits ~5 seconds
and then tries again. The PopUpMenu task will not be removed until it is safe
to do so. You may start PopUpMenu again)
* My inputhandler now checks if a string gadget is active and if so You will
get standard pull-down menues.
For Speed:
* Moved SysBase pointer to the stack. ( = FAST RAM if present)
Bugs fixed:
* Forgot to change parameters to "HighLight" -> Guru if HIGHIMAGE was used. (oops!)
New in version 4.1
~~~~~~~~~~~~~~~~~~
For comapbility:
* MIDRAWN, ISDRAWN, HIGHITEM now supported.
* MENUSTATE flag supported.
For use:
* Possible to set options from workbench.
* Menues no longer flashes when You multiple select a subitem.
* RMBTRAP is set in the option window.
(My compiler removed it when compiling with 16-bit ints).
Bugs fixed:
* Fixed bug that caused a guru if You multiple-selected a disabled item.
* Fixed bug that always opened the option window. (even with -O- option)
New in version 4.0
~~~~~~~~~~~~~~~~~~
* Command line options.
* Click menues.
* + Much more. Many bugs fixed ( and some new one introduced 8-( ).
New in version 3.7
~~~~~~~~~~~~~~~~~~
For compability:
* Fixed bug with the checkmark position.
(Thanks Mark Knibbs)
New in version 3.6
~~~~~~~~~~~~~~~~~~
For compability:
* PopUpMenu now works when a menu does not have any items.
(Thanks to Mark Knibbs for finding the bug)
For use:
* Itemwindow is now positioned in a different way to minimize mousemoves.
(Thanks to Gael Marziou, France)
New in version 3.5
~~~~~~~~~~~~~~~~~~
For compability:
* Disabled menues items are now shown.
* Menues are sorted after their LeftEdge value.
New in version 3.4
~~~~~~~~~~~~~~~~~~
For safety:
* Now checks to see if screen and window is still present after the
input.device lockup fix.
* Rearranged the files so all PopUpMenu hunks shows in Xoper.
(It should be 3 of them)
For compability:
* Fixed a small bugs that sometimes made itemwindows to small.
* The program no longer clears the menuitemfield before drawing
the highimage. (Intuition doesn't)
For Distribution:
* Now the PopUpMenu.run works (Ver 3.2 didn't OOPS!).
* Size is now < 7K.
New in version 3.2
~~~~~~~~~~~~~~~~~~
For speed:
* Some code optimizations (C -> Assembler).
For safety:
* MENUVERIFY is now fully supported.
* Forbid() and LockIBase() are now used where needed. (I hope.)
* Made my own SwapBitsRastPortClipRect. (No more guru #81000005)
For use:
* Shows if an item has subitems.
* Now always shows items & subitems (even if they cover other menuwindows).
* Now resumes after the input.device lock-up.
For compability:
* Fixed Fontbug.
New Distrbution:
* Public Domain. (i'm not a poor student anymore 8-) )